n=int(input())
for a in range(1,n+1):
    for b in range(1,n+1):
        for c in range(1,n+1):
            if n==a*a+b*b+c*c:
                print(a, b, c)